import { getContextData } from "waku/middleware/context"; import { getState } from "@/lib/db"; import { startStudySession } from "@/actions/srs"; import StudySession from "@/components/Flashcard/StudySession"; import { Button } from "@/components/ui/button"; import { Card } from "@/components/ui/card"; import LessonSelector from "@/components/srs/LessonSelector"; import type { PageProps } from "waku/router"; // This is a server component that gets the initial data export default async function StudyPage(props: PageProps<"/study/[slug]">) { const lessonId = props.slug; const ctx = getContextData() as any; const userId = ctx?.user?.id; // const state = getState(null); // If not logged in, show login required message if (!userId) { return (
You need to be logged in to use the study session feature.
idk
; }